package com.chatcompetition.controller;


import com.chatcompetition.domain.dto.FeedbackDTO;
import com.chatcompetition.result.Result;
import com.chatcompetition.service.FeedbackService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class FeedbackController {

    @Autowired
    private FeedbackService feedbackService;


    /**
     * 添加反馈
     */
    @PostMapping("/feedback")
    public Result addFeedback(@RequestBody FeedbackDTO feedbackDTO) {
        log.info("反馈内容：{}", feedbackDTO);
        feedbackService.addFeedback(feedbackDTO);
        return Result.success();
    }
}
